package common

import (
	"bytes"
)

//字符串拼接（利用字节缓冲区：性能好）
//result	*string		承载字段
//str		...string	需要拼接字段
func BenchmarkAddStringWithBuffer(result *string, str ...string) {
	var buffer bytes.Buffer
	if len(str) != 0 {
		for _, v := range str {
			buffer.WriteString(v)
		}
	}
	*result = buffer.String()
}
